import Vue from 'vue'
import App from './App'
import JsEncrypt from './static/js/jsencrypt.js'
import store from './store'

// 全局组件注册
import mInput from '@/components/m-input.vue'
import model from '@/components/model/model.vue'
import uniSteps from "@/components/uni-steps/uni-steps.vue"
import uniLoadMore from "@/components/uni-load-more/uni-load-more.vue"
// import mixTree from "@/components/mix-tree/mix-tree.vue"
import sheet from "@/components/bbh-sheet/bbh-sheet.vue"
import rattenkingPicker from "@/components/rattenking-dtpicker/rattenking-dtpicker.vue"
import tTable from "@/components/t-table/t-table.vue"
import tTd from "@/components/t-table/t-td.vue"
import tTh from "@/components/t-table/t-th.vue"
import tTr from "@/components/t-table/t-tr.vue"
// import cmdProgress from"@/components/xiaoran-circle/xiaoran-circle.vue"
Vue.component('m-input', mInput)
Vue.component('model', model)
Vue.component('uni-steps', uniSteps)
Vue.component('uni-load-more', uniLoadMore)
// Vue.component('mix-tree',mixTree)
Vue.component('sheet', sheet)
Vue.component('rattenking-picker', rattenkingPicker)
Vue.component('t-table', tTable)
Vue.component('t-td', tTd)
Vue.component('t-th', tTh)
Vue.component('t-tr', tTr)
// Vue.component('cmd-progress',cmdProgress)
Date.prototype.format = function (fmt) {
    var o = {
        "M+": this.getMonth() + 1, //月份
        "d+": this.getDate(), //日
        "h+": this.getHours(), //小时
        "m+": this.getMinutes(), //分
        "s+": this.getSeconds(), //秒
        "q+": Math.floor((this.getMonth() + 3) / 3), //季度
        "S": this.getMilliseconds() //毫秒
    };
    if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
    for (var k in o)
        if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
    return fmt;
}


Vue.config.productionTip = false

Vue.prototype.$store = store
Vue.prototype.$jsEncrypt = JsEncrypt

App.mpType = 'app'

const app = new Vue({
    store,
    ...App
})
app.$mount()
